package drg_group.chs_drg_10.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.chs_drg_10.Base;
import drg_group.chs_drg_10.MedicalRecord;
import drg_group.chs_drg_10.DRG.MDCF_DRG;

public class FD1 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={"Q20.000","Q20.100","Q20.200","Q20.200x002","Q20.300","Q20.300x002","Q20.301","Q20.302","Q20.400","Q20.500","Q20.500x001","Q20.600x001","Q20.601","Q20.801","Q20.802","Q21.000","Q21.100","Q21.100x001","Q21.101","Q21.102","Q21.105","Q21.106","Q21.200","Q21.201","Q21.203","Q21.204","Q21.205","Q21.206","Q21.300x001","Q21.300x002","Q21.300x003","Q21.400x001","Q21.800","Q21.800x003","Q21.804","Q21.805","Q21.900","Q22.000","Q22.100","Q22.102","Q22.200","Q22.301","Q22.302","Q22.400","Q22.500","Q22.600","Q22.801","Q22.802","Q22.900","Q23.000","Q23.001","Q23.100","Q23.101","Q23.200","Q23.300","Q23.400","Q23.401","Q23.800","Q23.801","Q23.802","Q23.804","Q23.901","Q24.000x002","Q24.000x003","Q24.100","Q24.200","Q24.300","Q24.400","Q24.501","Q24.502","Q24.503","Q24.504","Q24.505","Q24.506","Q24.507","Q24.508","Q24.509","Q24.510","Q24.511","Q24.600x002","Q24.601","Q24.800","Q24.800x010","Q24.800x011","Q24.800x012","Q24.800x014","Q24.800x017","Q24.800x018","Q24.800x030","Q24.804","Q24.806","Q24.807","Q24.808","Q24.809","Q24.810","Q24.813","Q24.900","Q24.901","Q25.000","Q25.100","Q25.200","Q25.300","Q25.301","Q25.302","Q25.400x009","Q25.400x010","Q25.400x012","Q25.400x013","Q25.401","Q25.402","Q25.403","Q25.404","Q25.405","Q25.407","Q25.408","Q25.500","Q25.600","Q25.601","Q25.700x006","Q25.700x007","Q25.700x008","Q25.700x011","Q25.701","Q25.702","Q25.703","Q25.704","Q25.705","Q26.000x001","Q26.100","Q26.200x001","Q26.300","Q26.500","Q26.600","Q26.800x001","Q26.800x002","Q26.800x004","Q26.800x005","Q26.800x006","Q26.800x007","Q26.800x008","Q26.800x010","Q26.801","Q87.400"};
        String[] adrg_zd1={};
        String[] adrg_ss={"35.1400x002","35.2100x002","35.3101","35.3400x001","35.4201","35.5100x004","35.5100x005","35.5400x003","35.5400x004","35.5400x005","35.5400x006","35.6100x001","35.6300x003","35.6300x004","35.6300x005","35.7100x008","35.7100x010","35.7101","35.7200x002","35.7201","35.7300x002","35.7300x003","35.7300x004","35.7300x005","35.7300x006","35.7300x007","35.7301","35.8100x001","35.8100x002","35.8100x003","35.8100x004","35.8100x005","35.8100x006","35.8200x006","35.8200x008","35.8200x009","35.8200x010","35.8200x011","35.8200x012","35.8200x013","35.8201","35.8300x004","35.8300x005","35.8301","35.8302","35.8303","35.8304","35.8305","35.8307","35.8308","35.8309","35.8400x001","35.8400x002","35.8400x003","35.9101","35.9102","35.9200x001","35.9200x003","35.9200x004","35.9200x005","35.9201","35.9202","35.9300x002","35.9300x003","35.9300x004","35.9300x005","35.9301","35.9302","35.9400x003","35.9400x004","35.9400x005","35.9400x006","35.9401","35.9402","35.9500x002","35.9500x007","35.9500x008","35.9501","35.9900x002","36.9902","37.3300x009","37.3300x020","37.3300x021","37.3300x029","37.3500x005","37.3501","37.4900x014","38.3500x002","38.8500x013","38.8500x019","39.2100x001","39.2100x003","39.2100x004","39.2100x005","39.2100x006","39.2100x007","39.2102","39.4903","39.4904","39.5900x034"};
        String[] adrg_ss1={};
        
        if (true && Base.contains(adrg_zd,record.zdList[0]) && record.ssList!=null && record.ssList.length>0 && Base.contains(adrg_ss,record.ssList[0])){
            Base.groupMessages.putMessage(record.Index,"符合FD1入组条件，匹配规则：主诊断匹配、主手术匹配");
                
            if (MDCF_DRG.FD19_group(record)){
                return "FD19";
            }

            return "FD1";
        }else{
            return "";
        }
    }
}

